package com.linkgap.cloud.test;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class Computer {


    private String color;

    private Double size;

    private String sn;

    private Brand brand;

    private String owner;


    public static void main(String[] args) {

        Computer xx14 = new Computer();
        Computer xx16 = new Computer();


        xx14.setColor("黑色");
        xx14.setSize(14d);
        xx14.setOwner("mjq");
        xx14.setSn("sn1234");

        Brand lx = new Brand();
        lx.setCiteCode(1111);
        lx.setCiteName("台湾");
        lx.setName("理想");
        xx14.setBrand(lx);


        Brand lx2 = new Brand();
        lx2.setCiteCode(12345);
        lx2.setCiteName("台湾");
        lx2.setName("理想");
//        xx14.setBrand(lx);


        xx16.setColor("黑色");
        xx16.setSize(15.6d);
        xx16.setOwner("yhy");
        xx16.setSn("sn4321");
        xx16.setBrand(lx);

        List<Computer> computerList = new ArrayList<>();
        computerList.add(xx14);
        computerList.add(xx16);
        System.out.println(computerList);


        Set<Brand> brandSet = new HashSet<>();
        brandSet.add(lx);
        brandSet.add(lx2);
        System.out.println(brandSet);


    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Double getSize() {
        return size;
    }

    public void setSize(Double size) {
        this.size = size;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public Brand getBrand() {
        return brand;
    }

    public void setBrand(Brand brand) {
        this.brand = brand;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }
}
